libname bond 'D:\name your local directory';


%LET IN_DATA=LTB;
%LET OUT =LTB3;

data LTB;
set bond.&IN_DATA;
run;

*Add bond-level liquidity measure;

proc sql;
create table LTB3 as select a.*, b.gamma_bpw as ILLIQ, b.N_ILLIQ
from LTB as a left join bond.liq_bpw as b
on a.complete_cusip=b.complete_cusip and a.date=b.date;
quit;

proc sort data=LTB3;
by complete_cusip date;
run;


data bond.&out;
set LTB3;
run;
